package edu.westga.vocalengineer.audio.gui;

import java.awt.Color;

import javax.swing.BorderFactory;
import javax.swing.JCheckBox;
import javax.swing.JPanel;

import edu.westga.vocalengineer.audio.transforms.ReverseTransform;

public class ReverseGuiTransform extends ReverseTransform implements
		IGuiTransform {

	JPanel optionsPanel;
	JCheckBox reverseEnabledCheck;
	
	public ReverseGuiTransform() {
		optionsPanel = new JPanel();
		reverseEnabledCheck = new JCheckBox("Enable Reverse Transform");
		optionsPanel.add(reverseEnabledCheck);
		optionsPanel.setBorder(BorderFactory.createLineBorder(Color.black));
	}
	
	@Override
	public short[] exectueWithGuiOptions(short[] samples) {
		if(!reverseEnabledCheck.isSelected()) return samples;
		return execute(samples);
	}

	@Override
	public JPanel getOptionsPanel() {
		return optionsPanel;
	}

}
